//
//  BatteryView.m
//  Nurse
//
//  Created by 张敏 on 14-1-12.
//  Copyright (c) 2014年 Honeywell. All rights reserved.
//

#import "BatteryView.h"

@implementation BatteryView

-(void)changeBattery2{
    _imgVBattery.hidden = NO;
    _imgVBattery.image = [[UIImage imageNamed:@"battery-process.png"] resizableImageWithCapInsets:UIEdgeInsetsZero];
    _imgVBattery.left=70;
        _imgVBattery.top=2;
    _imgVBattery.width =50;
    _imgVBattery.contentMode= UIViewContentModeScaleToFill;
    self.lblzt.text=@"50%";
    
}
-(void)changeBattery3{
    _imgVBattery.hidden = NO;
    _imgVBattery.image = [[UIImage imageNamed:@"battery-process.png"] resizableImageWithCapInsets:UIEdgeInsetsZero];
    _imgVBattery.left=70;
    _imgVBattery.top=2;
    _imgVBattery.width =75;
    _imgVBattery.contentMode= UIViewContentModeScaleToFill;
    self.lblzt.text=@"75%";
    
}
-(void)changeBattery{
    _imgVBattery.hidden = NO;
    _imgVBattery.image = [[UIImage imageNamed:@"battery-process.png"] resizableImageWithCapInsets:UIEdgeInsetsZero];
    _imgVBattery.width =100;
        _imgVBattery.top=2;
    _imgVBattery.left=70;
    _imgVBattery.contentMode= UIViewContentModeScaleToFill;
    self.lblzt.text=@"100%";
}

//低电量
-(void)lowPower{
     _imgVBattery.hidden = NO;
    _imgVBattery.image = [UIImage imageNamed:@"battery-process_low.png"];
    _imgVBattery.left=68;
    _imgVBattery.top=2;
    _imgVBattery.width = 25;
    self.lblzt.text=@"25%";
    self.lblzt.textColor = [UIColor redColor];
    
}

//没电量
-(void)nonePower{
    _imgVBattery.image = [UIImage imageNamed:@"battery-none.png"];
    self.lblzt.text=@"0%";
        _imgVBattery.top=2;
    _imgVBattery.contentMode= UIViewContentModeCenter;
}

//充电
-(void)charging{
    _imgVBattery.image = [UIImage imageNamed:@"battery-charging.png"];
    self.lblzt.text=@"充电中";
        _imgVBattery.top=2;
    _imgVBattery.contentMode= UIViewContentModeCenter;
}
//连接中
-(void)Undefined{
    _imgVBattery.image = [UIImage imageNamed:@"battery-none.png"];
    self.lblzt.text=@"连接中";
    _imgVBattery.top=2;
    _imgVBattery.contentMode= UIViewContentModeCenter;
}
@end
